package com.heima.model.user.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.util.Date;

@Data
@TableName("ap_user_follow")
public class ApUserFollow {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    @TableField("follow_id")
    private Integer followId;

    @TableField("follow_name")
    private String followName;

    /**
     * 0 正常
     * 1 潜力股
     * 2 勇士
     * 3 铁杆
     * 4 老铁',
     */
    @TableField("level")
    private Short level;

    @TableField("is_notice")
    private Boolean isNotice;

    @TableField("created_time")
    private Date createdTime;

    // level枚举
    @Alias("levelEnum")
    public enum LevelEnum {
        NORMAL((short) 0),
        POTENTIAL((short) 1),
        WARRIOR((short) 2),
        IRON((short) 3),
        OLD((short) 4);

        private short level;

        LevelEnum(Short level) {
            this.level = level;
        }

        public short getLevel() {
            return level;
        }
    }

}
